package com.yrk.service.impl;

import com.yrk.dao.UserDao;
import com.yrk.dao.impl.UserDaoImpl;
import com.yrk.entity.User;
import com.yrk.service.UserService;

import java.util.List;

public class UserServiceImpl implements UserService {
    private UserDao userDao = new UserDaoImpl();

    @Override
    public boolean addUser(String username, String password, String tel, String sex) {
        return userDao.addUser(username, password, tel, sex);
    }

    @Override
    public List<User> getUsers() {
        return userDao.getUsers();
    }

    @Override
    public User findUserByUserName(String userName) {

        return userDao.findUserByUserName(userName);
    }

    @Override
    public boolean checkUserName(String userName) {
        return userDao.checkUserName(userName);
    }
}
